package asia.hymsk.spring.pojo.mongodb;

/**
 * ClassName: Rating
 * Package: com.example.demo.test.pojo
 */

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

/**
 * 用户评分实体
 * @author 花于陌上开
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document("Rating")
public class Rating {
    @Id
    private String id;
    @Field
    private Double rating;//商品分值
    @Field
    private Integer userId;//⽤户ID
    @Field
    private Integer productId;//商品ID
    @Field
    private Long timestamp;//评分时间
}
